package com.wy.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wy.controller.dto.UserPasswordDTO;
import com.wy.entity.User;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * 作者：王昭贵
 * 日期：2023/1/5
 */
@Mapper
public interface UserMapper extends BaseMapper<User> {

    @Update("update user set password = #{newPassword} where username = #{username} and password = #{password}")
    int updatePassword(UserPasswordDTO userPasswordDTO);
}
